package cn.mw.cmdb.virtualization.enums;

/**
 * @description 主机状态枚举
 */
public enum VirtualizationHostStatusEnum {
    GRAY("gray","0"),
    GREEN("green","1"),
    YELLOW("yellow","2"),
    RED("red","3"),
    ;


    private String status;

    private String value;

    VirtualizationHostStatusEnum(String status, String value) {
        this.status = status;
        this.value = value;
    }

    public String getStatus() {
        return status;
    }

    public String getValue() {
        return value;
    }

    public static VirtualizationHostStatusEnum getHostStatusEnum(String value) {
        for (VirtualizationHostStatusEnum hostStatusEnum : values()) {
            if (value.equals(hostStatusEnum.getValue())) {
                return hostStatusEnum;
            }
        }
        return null;
    }
}
